91 Star 718 Fork 230

GVPcanonical-entropy / nop-entropy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.en.md 17.76 KB
一键复制 编辑 原始数据 按行查看 历史
canonical-entropy 提交于 2024-05-28 21:20 . 更新英文文档

[中文] [Tutorial] [开发示例] [Introduction and Q & A Video]

Nop Platform 2.0

Introduction

Reversible Computing: A Theory of Next Generation Software Construction

**Nop is nOt Programming (non-programming) **

Nop Platform 2.0 is a new generation of low-code platform based on the theory of reversible computation. It is committed to overcoming the dilemma that low-code platform can not get rid of the exhaustive method, transcending the component technology from the theoretical level, and effectively solving the problem of coarse-grained software reuse.

The Nop Platform 2.0 is a new generation of low code (lowcode) built from scratch based on the principle of reversible computing. Platform, it is committed to overcome the low-code platform can not get rid of the plight of the exhaustive method, from the theoretical level beyond the component technology, effectively solve the problem of coarse-grained software reuse.

-nop-entropy is the back-end part of the Nop platform. It is implemented in Java language, does not rely on third-party frameworks, and can be integrated with Quarkus, Spring or Solon frameworks.

-nop-entropy support for GraalVM technology, with the help of Quarkus or SpringNative The framework is compiled into a native executable program, no JDK installation is required at runtime, and the startup speed is increased by dozens of times.

-nop-entropy is designed to be a simple and easy-to-use domain language workbench (Domain Language Workbench) . By adding simple metadata definitions, you can automatically get the corresponding parsers, validators, IDE plug-ins, debugging tools, etc., and automatically add module decomposition, differential customization, meta-programming and other common language features for DSL domain languages. At this point, it is similar to Jetbrains company's MPS product It's just that its design principles and technical implementation paths are essentially different from MPS.

-The nop-entropy adopts a cloud-native design with built-in distributed transaction and multi-tenant support. It can run on a stand-alone machine or as a distributed cluster. It can provide online API services or automatically package online services for a single business object as batch tasks for batch files. For most business application scenarios, the corresponding model support is provided, and the main functions can be completed with a small amount of configuration, greatly reducing the need for manual coding.

-The nop-entropy can be used as a low-code platform supporting incremental development during the development period, automatically generating various codes and related documents, and can be used as a low-code platform during the runtime period *

  • Support technology for end-user codeless platform **, allowing customers to adjust business module functions online and iterate products in a WYSIWYG manner.

At present, the open source part mainly includes the implementation of XLang language, as well as ORM, dependency injection container (IoC), distributed configuration (Config), GraphQLEngine, report engine (Report. Engine), task scheduling engine (Job Scheduler), batch Prcessing engine (Batch Engine), rule engine (Rule Engine) and other basic frameworks, Follow-up planning includes workflow engine (Workflow Engine), business intelligence (BI), flow processing engine and other common parts of business development.

The code of Nop Platform 2.0 is refactored by Entropy Platform 1.0 recently, the integration of the domestic framework solon has been increased. see nop-solon. the size of the packaged jar package is more than 10 m lower than that of Spring and Quarkus.

Development Progress:

Module Description Progress
nop-api-support Support classes for API interface Completed
nop-codegen Data-Driven Code Generator Completed
nop-antlr Model-driven retrofit of Antlr Completed
nop-core Virtual File System, Reflection Mechanism, XML/JSON Parsing Completed
nop-ioc Declarative IoC Container Completed
nop-config Dynamic Configuration Center Completed
nop-xlang XLang Scripting and Template Languages Completed
nop-dao JDBC Access, Transaction, Database Dialects Done
nop-orm Next Generation ORM Engine Completed
nop-graphql GraphQL Engine Completed
nop-rpc Distributed RPC call Completed
nop-ooxml Parsing and generation of Office files, replacing POI. Word Report Template Completed
nop-report Chinese Reporting Engine Completed
nop-rule Rules Engine Completed
nop-autotest Model-Driven Test Automation Framework Completed
nop-idea-plugin IDEA development plug-in, supporting syntax prompt, file jump, breakpoint debugging Basically available
nop-cli Encapsulates code generators, file listening, and more as command-line tools Basic
nop-cluster Distributed cluster support 50%
nop-tcc Distributed Transactions 50%
nop-dyn Design forms, data models, and service functions online Basic
nop-workflow Workflow Engine 65%
nop-task Logical Flow Orchestration 50%
nop-job Distributed Task Scheduling 40%
nop-batch Batch Engine 70%
nop-message Kafka/Pulsar Message Queue Encapsulation 10%
nop-dbtool Database Import and Export, Data Structure Comparison, Synchronization Tool 30%
nop-nosql Redis Package 0%
nop-stream Simplified stream processing, which can be integrated with Flink 0%
nop-netty TCP/IP Service Processing Framework 0%
nop-datav BI Data Analysis 0%
nop-gpt Integration with AI Big Model for AIGC 2%
nop-js GraalVM Js engine encapsulation to run JS in Java 50%
nop-integration External service packages such as mail, SMS, and file services 30%
nop-auth User Rights Management Completed
nop-sys System Configuration Management Completed

Source code address

-gitee: https://gitee.com/canonical-entropy/nop-entropy -github: https://github.com/entropy-cloud/nop-entropy

Design principle

Reversible Computing: A Theory of Next Generation Software Construction

NOP: The Next Generation Software Production Paradigm

What kind of ORM engine do low-code platforms need?

Analysis of Reversible Calculation Theory Written to Programmers

Addendum to Reversible Calculation Theory Discrimination for Programmers

Quick start

Development Example

Introduction and Q & A Video

Development Documentation Guide

Integration with Ruoyi Framework

More video

Software Architecture

nop-entropy the Spring framework is not used, all modules are developed from scratch in a model-driven manner (much of the code in the framework itself is also model-generated and can be customized and adjusted declaratively). In principle, nop-entropy can run on top of any microservices framework that supports the REST service standard. At present, we mainly support the integration of Quarkus framework and Spring framework.

Quarkus is a new generation of cloud-native microservice framework open source by Redhat. Its development experience and GraalVM Native compilation is significantly more mature than the Spring framework. With the help of Quarkus framework, we can compile the application into a single uber jar (through java -jar instruction to run), you can also compile the program into an exe executable program, you don't need to install JDK at runtime, and the startup speed is increased by dozens of times. At present, the development and debugging of nop-entropy is mainly based on the Quarkus framework, so there may be some minor problems with the support of Spring framework.

Front-end code for the Nop platform In the nop-chaos project, the nop-chaos packaged result is packaged as the following Java module.

  1. nop-web-site: The packaging result of the front-end main page framework.
  2. nop-web-amis-editor: The packaging results of the AMIS visual editor used by the front end. In general business development, we only write JSON and a few JS files, and do not need to recompile nop-chaos project.

Installation Tutorial

Environment preparation: JDK 17 +, Maven 3.9.3 +, Git

git clone https://gitee.com/canonical-entropy/nop-entropy.git
cd nop-entropy
mvn clean install -DskipTests -Dquarkus.package.type=uber-jar

Note: JDK17 or above is required to compile and run. JDK8 is not supported. **When running in PowerShell, you need to wrap the parameters in quotation marks * *

According to feedback, some JDK versions will report errors when compiling, such as jdk:17.0.9-graal will report errors IndexOutOfBound exceptions, so if there is a problem with compiling, you can try the OpenJDK first.

mvn clean install "-DskipTests" "-Dquarkus.package.type=uber-jar"

The quarkus.package.type parameter is a parameter recognized by the quarkus framework. Specifying it as a uber-jar will package items such as nop-quarkus-demo into a single jar package containing all dependent classes. You can do it through Java. -Jar XXX-runner.jar way to run directly.

PowerShell garbled code problem solved

You can set the encoding of the PowerShell to UTF8

$OutputEncoding = [Console]::OutputEncoding = [Text.Encoding]::UTF8

you have upgraded to quarkus3.0, and running nop-auth-app and other modules with an earlier version of maven may fail. We recommend upgrading to Maven. Version 3.9.3, or use the mvnw command in the nop-entropy directory, it will automatically download and use maven 3.9.3.

  • nop-idea-plugin nop-idea-plugin is a plug-in project for IDEA and must be compiled using Gradle.
cd nop-idea-plugin
gradlew buildPlugin

The idea packaging plug-in currently in use does not support a higher version of gradle. gradlew will automatically download the required gradle version, currently using 7.5.1 if you want to speed up the gradle download speed, you can change it to gradle-wrapper.properties distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.5.1-bin.zip

The compiled plug-ins are stored in the build/distributions directory. See Plug-in Installation and Use.

Instructions for use

  • Platform built a demo program, using H2 memory database, you can directly start running
cd nop-demo/nop-quarkus-demo/target
java -Dquarkus.profile=dev -jar nop-quarkus-demo-2.0.0-SNAPSHOT-runner.jar

If you do not specify profile = dev, it will start in prod mode. In the prod mode, you need to configure the database connection in the application.yaml. By default, the local MySQL database is used.

  • Access link [http:// localhost:8080](http:// localhost:8080), * * User name: nop, Password: 123 * *

  • In IDEA, you can debug and run QuarksDemoMain classes in nop-quarks-demo projects. The quarkus framework provides the following debugging tools during development,

http://localhost:8080/q/dev http://localhost:8080/q/graphql-ui

In the graphql-ui tool, you can view the definitions and parameters of all backend service functions.

  • For a complete development example, see tutorial

Framework Integration

nop-entropy does not rely on Spring or quarkus frameworks, nor does it depend on a specific database, so it is easy to integrate and use in third-party applications.

The functionality of the core engine does not depend on the database and can be run in pure memory. All storage-related code has been stripped into separate dao modules, such as nop-auth-dao,nop-sys-dao, etc.

  1. Use as an incremental code generation tool: maven can read Excel model files when packaging, apply the specified template directory, and generate code in an incremental manner. See codegen.md

  2. Provide reversible computing support for existing XML/JSON/YAML format configuration files and domain model files: add dynamic decomposition, merging, and product customization mechanisms for model files, which are completely transparent to the application layer, and only need to write a custom model file loader for the engine layer. See delta-loader.md

  3. Provide support for development domain-specific languages (DSL): You only need to define xdef metamodel files to obtain IDE support such as syntax prompts, link jumps, breakpoint debugging, etc. Visual designer customization support will be provided later. See idea-plugin.md

  4. Use as a model-driven GraphQL engine: Automatically generate GraphQL services based on Excel models and support the addition, deletion, modification and query of complex main tables. See graphql.md

  5. Use as a report engine: only need to add a small number of labels to Word or Excel files to run as a report template and dynamically generate complex Chinese-style reports. See report.md

  6. Use as a workflow engine: combined with a timing scheduling engine, it supports manual approval workflows and distributed DAG task flows similar to airflow. See workflow.md

  7. Use as a batch engine: Similar to the SpringBatch + XXLJob framework, it provides distributed batch task support. You can specify how to parse and generate text or binary data files through configuration files without writing parsing and generation code. See batch.md

  8. Use as a rule engine: realize complex business rule judgment through configuration. See rule.md

  9. Use as a data-driven automated testing framework: Automated testing through recording and playback mechanisms. The output data is automatically recorded during the first run, and then automatically compared with the recorded data snapshot during the run, reducing the amount of code that needs to be written manually. See autotest.md

Sample page

  1. Interface Framework

  2. Use Excel to define the data model.

  3. Use Excel to define the API model for external release

  4. Integrate Baidu's front-end low-code framework AMIS

  5. Integrated GraphQL debugging tools

  6. Provide IDEA plug-in to support breakpoint debugging of custom DSL

  7. Use Excel as a report designer to support complex Chinese reports.

  8. Use the Word template to export Word reports.

  9. Use Excel to design decision tables and decision matrices.

Open Source Protocol

The front-end of the Nop platform uses the MIT protocol, and the back-end uses the AGPL3.0 open source protocol as a whole. However, small and medium-sized enterprises in China can use the code of this project under conditions similar to the Apache2.0 agreement (it can be used for free commercial use, and the modification of the code does not need to be open source, but the original copyright information in the source code should be retained). In order to facilitate third-party integration, the 3 packages of nop-api-support/nop-commons/nop-core use Apache 2.0 agreement.

  • The algorithm for judging whether a small or medium-sized enterprise is as follows:
Switch (Is your company rich ()){
  case "plenty of money":{
    console.log("With so much money, do you still need to wonder all day long whether other people's intellectual property rights are free?");
    return false;
  default:
    return true;
  }
}

Technical Support

Problems or bugs encountered in use can be mentioned on Gitee

Acknowledgements

Community

Author WeChat and WeChat Discussion Group

Please note when adding WeChat: Join Nop Platform Group

WeChat Public Number

Java
1
https://gitee.com/canonical-entropy/nop-entropy.git
git@gitee.com:canonical-entropy/nop-entropy.git
canonical-entropy
nop-entropy
nop-entropy
master

搜索帮助